package jjn.time_api.case5;

import java.time.Instant;
import java.time.LocalDateTime;
import java.time.ZoneId;
import java.time.format.DateTimeFormatter;
import java.util.Scanner;

/**
 * @author Jjn
 * @since 2023/8/16 13:56
 */
public class Main {
    public static void main(String[] args) {
        DateTimeFormatter pattern = DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss");
        Scanner scanner = new Scanner(System.in);
        while (scanner.hasNext()) {
            int input = scanner.nextInt();
            Instant instant = Instant.ofEpochSecond(input);
            LocalDateTime time = instant.atZone(ZoneId.systemDefault()).toLocalDateTime();
            System.out.println(time.format(pattern));
        }
    }
}
